<%@taglib uri="/WEB-INF/struts-html.tld"  prefix="html"%>
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@taglib uri="/WEB-INF/struts-bean.tld"  prefix="bean"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<html:form action="account.do?action=accountCardUpdate">
    <table cellpadding="1" cellspacing="1" width="100%">
        <tr class="netral">
            <td colspan="2"><bean:message key="account.kartu"/> <bean:message key="label.edit"/></td>
        </tr>
        <tr class="form">
            <td><bean:message key="account.nama"/></td>
            <td>:
                <html:select property="namaCard">
                    <option><bean:message key="label.KTP"/></option>
                    <option><bean:message key="label.NPWP"/></option>
                    <option><bean:message key="label.SIM"/></option>
                    <option><bean:message key="label.PERPUSTAKAAN"/></option>
                </html:select>
            </td>
        </tr>
        <tr class="form">
            <td><bean:message key="account.kartu"/></td>
            <td>: <html:text property="noCard" size="50"/></td>
        </tr>
        <tr class="form">
            <td colspan="2" align="right"><input type="button" onclick="validate_Card_form()" value="${buttonUpdate}"/></td>
        </tr>
    </table>
</html:form>
<table cellpadding="1" cellspacing="1" width="100%" >
    <tr class="netral">
        <td colspan="4"><bean:message key="label.tabel"/> <bean:message key="account.kartu"/></td>
    </tr>
    <tr align="center" class="header">
        <td><bean:message key="label.no"/></td>
        <td><bean:message key="account.kartu"/></td>
        <td><bean:message key="account.nama"/></td>
        <td><bean:message key="label.delete"/></td>
    </tr>
    <logic:notEmpty name="listAccountCard">
        <c:forEach var="listAccountCard" items="${listAccountCard}" varStatus="row">
            <c:if test="${(row.count) % 2 == 0}"><tr class="over"></c:if>
            <c:if test="${(row.count) % 2 != 0}"><tr class="down"></c:if>
                <td width="5%"><c:out value="${row.count}"/></td>
                <td width="20%"><c:out value="${listAccountCard.noCard}"/></td>
                <td width="70%"><c:out value="${listAccountCard.nama}"/></td>
                <td><html:link action="/account.do?action=accountCardEditDelete" paramName="listAccountCard" paramProperty="noCard" paramId="noCard" styleClass="noLink"><bean:message key="label.yes"/></html:link></td>
            </tr>
        </c:forEach>
    </logic:notEmpty>
    <tr class="form">
        <td colspan="4">&nbsp;</td>
    </tr>
    <logic:empty name="listAccountCard">
        <tr class="form">
            <td colspan="4" align="center"><bean:message key="account.kartu"/> <bean:message key="label.isEmpty"/></td>
        </tr>
    </logic:empty>
    <tr class="form">
        <td colspan="4" align="right"><html:link href="account.do?action=accountEdit&id=${accountId}" styleClass="noLink"><input type="button" value="${buttonBack}"/></html:link></td>
    </tr>
</table>